#pragma once


#include "Math/Math.h"
#include "CameraParameters.m.h"

RENUM()
enum class EProjectionType
{
    Perspective,
    Orthographic
};

//相机的原始参数
struct WHENGINE_API SRawCameraParameters
{
    SVec3 ViewportPosition; 
    SQuat ViewportRotation;
    
    //width / height
    float AspectRatio=1920/1080.f;
    float PerspectiveFOVY=90.f;
    EProjectionType ProjectionType=EProjectionType::Perspective;
    float OrthographicWidth=512.f;
    float Near=0.1f;
    float Far=100000.f;

    SMatrix4x4 CalculateProjectionMatrix() const;
    SMatrix4x4 CalculateViewMatrix() const;
};

//相机的渲染参数
struct WHENGINE_API SRenderCameraParameters
{
    SRawCameraParameters RawParameters;

    SMatrix4x4 ViewMatrix;
    SMatrix4x4 ProjectionMatrix;
};